<%@ include file="/common/taglibs.jsp"%>
<%@ page pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${jquery}/jquery.js"></script>
		<script type="text/javascript" src="${jquery}/jquery.validate.js"></script>
		<script type="text/javascript" src="${jquery}/jquery.form.js"></script>
		<script type="text/javascript" src="${jquery}/messages_cn.js"></script>
		<script type="text/javascript" src="${easyui}/jquery.easyui.min.js"></script>
		<link rel="stylesheet" type="text/css"
			href="${easyui}/themes/icon.css">
		<link rel="stylesheet" type="text/css"
			href="${easyui}/themes/default/easyui.css">
		<link href="${app}/hnjz.css" rel="stylesheet" type="text/css">

		<script type="text/javascript"
			src="${colorbox}/jquery.colorbox-min.js"></script>
		<link rel="stylesheet" type="text/css" href="${colorbox}/colorbox2.css">
	</HEAD>

	<body>
		<div style="padding: 20px;">
			<form id="myform" name="myform" method="post" action="savePas.json">
			<table width = "50%" border="0" align="center" cellpadding="0"
					cellspacing="0" class="formtable">
				<div id="neirong" style="padding: 5px;">
					<tr>
						<th>
							<span class="mark">*</span>当前密码：
						</th>
						<td>
							<input class="i-text" type="password" id="oldPas" name="oldPas"
							value="${userForm.oldPas}" />
						</td>
					</tr>
					<tr>
						<th>
							<span class="mark">*</span>新密码：
						</th>
						<td>
							<input class="i-text" type="password" value="${userForm.password}"
							id="password" name="password"" />
						</td>
					</tr>
					<tr>
						<th>
							<span class="mark">*</span>确认密码：
						</th>
						<td>
							<input class="i-text" type="password" value="${userForm.confirmPassword}"
							id="confirmPassword" name="confirmPassword" />
						</td>
					</tr>
					<tr>
						<td align="center" colspan="2">
							<span class="btn btn-ok"> <input type="submit" value="提交">
							</span>&nbsp;
							<a href="#" id="J-from-reset">重置</a>
						</td>
					</tr>
				</div>
				</table>
			</form>
		</div>
	</body>
</HTML>
<SCRIPT LANGUAGE="JavaScript">

var lastRowIndex;
$(document).ready(function(){
    $("#selectParent").colorbox({iframe:true,width:"300", height:"400"});
	$("#J-from-reset").click(function(){
	   $("#myform").reset();
	});
   	//表单校验
    $("#myform").validate(
    {
          errorClass: "error",
          submitHandler:function(form){
		      $(form).ajaxSubmit({
		        type:"post",
		        success: function(data){
			       	$.messager.alert("保存密码:", data.msg, "info", function () {
			       	   window.location.reload("editPas.htm");
			        });
		        }
		      });
		  },
          rules:
          {  
			 "oldPas": { required: true },
			 "password": { required: true },
			 "password": { required: true },
			 "confirmPassword": { required: true }
          }
     });
});
</SCRIPT>